import React from 'react';
import { Button } from 'antd';
import { useNavigate } from 'react-router-dom';
import './index.less';

const NotFound: React.FC = () => {
  const navigate = useNavigate();
  
  const goBack = () => {
    navigate(-1);
  };
  
  const goHome = () => {
    navigate('/dashboard');
  };
  
  return (
    <div className="not-found-container">
      <div className="glitch-bg"></div>
      
      <div className="not-found-content">
        <div className="not-found-code">
          <div className="digit">4</div>
          <div className="digit">0</div>
          <div className="digit">4</div>
        </div>
        
        <div className="not-found-title">页面不存在</div>
        
        <div className="not-found-message">
          抱歉，您访问的页面不存在或已被移除
        </div>
        
        <div className="not-found-actions">
          <Button className="action-btn back-btn" onClick={goBack}>
            返回上页
          </Button>
          <Button type="primary" className="action-btn home-btn" onClick={goHome}>
            返回首页
          </Button>
        </div>
      </div>
    </div>
  );
};

export default NotFound; 